<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
<head>
    <meta charset="UTF-8">
    <title>文学作品-查看详细</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/index.css">
    <!-- 可选的 Bootstrap 主题文件（一般不用引入） -->
    <link href="/css/materialdesignicons.min.css" rel="stylesheet">
    <link href="/css/style.min.css" rel="stylesheet">
    <script src="/js/jquery.min.js"></script>
    <!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
    <script src="/js/bootstrap.min.js"></script>
</head>
<body class="body">
<div th:insert="~{navigation :: copy}"></div>
<div class="container">
    <h2>文学作品-查看详细</h2>
    <hr>
    <div class="row">
        <form  action='/culture/getAllCulture' id="form3" method='post' role="form">
            <input type="hidden" name="page" id="pageNo" th:value="${page}">
        </form>
        <div  class="col-lg-8">
            <dl class="row" th:each="culture:${culturePage.getRecords()}">
                <dt class="col-sm-9"><a th:href="@{'/culture/getCultureById?cultureId='+${culture.cultureId}}" ><span th:text="${culture.cultureTittle}"></span></a></dt>
                <dd class="col-sm-3"><span th:text="${#temporals.format(culture.cultureTime,'yyyy-MM-dd')}"></span></dd>
            </dl>
        </div>
        <div class="col-lg-2"></div>
        <div class="pagination">

            <div id="myPage"></div>
            <link rel="stylesheet" type="text/css" href="/js/page/jquery.sPage.css">
            <script type="text/javascript"
                    src="/js/jquery.min.js"></script>
            <script type="text/javascript"
                    src="/js/page/jquery.sPage.min.js"></script>
            <script type="text/javascript" th:inline="javascript">
                //初始化分页组件

                $("#myPage").sPage({

                    page:[[${page}]],//当前页码，必填
                    total:[[${culturePage.getTotal()}]],//数据总条数，必填
                    pageSize:[[${culturePage.getSize()}]],//每页显示多少条数据，默认10条
                    totalTxt:"共"+[[${culturePage.getTotal()}]]+"条",//数据总条数文字描述，{total}为占位符，默认"共{total}条"
                    showTotal:true,//是否显示总条数，默认关闭：false
                    showSkip:true,//是否显示跳页，默认关闭：false
                    showPN:true,//是否显示上下翻页，默认开启：true
                    prevPage:"上一页",//上翻页文字描述，默认“上一页”
                    nextPage:"下一页",//下翻页文字描述，默认“下一页”
                    backFun:function(page){
                        //点击分页按钮回调函数，返回当前页码
                        console.log(page);
                        $("#pageNo").val(page);
                        $("#form3").submit();
                    }
                });

                //回调方法:点击上一页和下一页
                function handlePaginationClick(culture_page_index, pagination_container) {
                    $("#pageNo").val(culture_page_index + 1);
                    $("#form3").submit();
                }
            </script>

        </div>
    </div>


</div>
</div>

</body>
</html>